package test.entity;

import java.util.Collection;

public class MyModel_2 {
	private String id;
	private String name;
	private Collection<MyModel_3> details;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Collection<MyModel_3> getDetails() {
		return details;
	}

	public void setDetails(Collection<MyModel_3> details) {
		this.details = details;
	}

	public String toString() {
		StringBuffer buf = new StringBuffer(String.format(
				"Id: %1$s, Name:%2$s", id, name));
		buf.append("\n").toString();
		if (details == null) {
			buf.append("\t").append("details NULL\n");
		} else {
			buf.append("\t").append("details size:").append(details.size())
					.append("\n");
			for (MyModel_3 d : details) {
				buf.append("\t").append(d.toString()).append("\n");
			}
		}

		return buf.toString();
	}
}
